﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DataFlowReport.aspx.cs" Inherits="MLY.Reports.ChartReports.DataFlowReport" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>    

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title><asp:Literal ID="TitleLiteral" runat="server" Text="<%$Dict:DataFlowReport.Title %>"></asp:Literal></title>
    
    <link href="/Style/General_Style.css" rel="stylesheet" type="text/css" />
    <link href="../../Style/ReportsStylesheet.css" rel="stylesheet" type="text/css" />   
</head>
<body>
    <form id="form1" runat="server">
    <div class="InerTextStyle">
    <asp:ToolkitScriptManager ID="ScriptManager1" runat="server"></asp:ToolkitScriptManager>
    <asp:Panel ID="DirectionPanel" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
    
        <asp:HiddenField ID="UserRoleHiddenField" runat="server" />
        
        <asp:Label ID="PageTitleLabel" runat="server" Text="<%$Dict:DataFlowReport.Title %>" CssClass="TitleStyle"></asp:Label>
        <asp:Panel ID="DemoPanel1" runat="server">
            <div class="democlass">
                In the Step time deviation report you have 4 kinds of dates, you can choose 2 kinds and see how much time passed between those two dates. 
                You can also filter by organization and between two specific dates with the date pickers.
            </div>
        </asp:Panel>   
        <br /><br />
        <table cellpadding="5" cellspacing="0">
        <tr>
        <td>
            <asp:Label ID="OrganizationTitleLabel" Text='<%$Dict:reportsParams.ChooseOrganization: %>' runat="server"></asp:Label>
        </td>
        <td>
            <asp:DropDownList ID="ddlOrgs" runat="server" DataTextField="OrganizationName"
                DataValueField="OrganizationId" OnLoad="ddlOrgs_Load">
            </asp:DropDownList>
            
        </td>
        <td>
            <asp:Label ID="DateStringTitleLabel" runat="server" Text='<%$Dict:advancedRptPrams.chooseDateFilter: %>'></asp:Label>
        </td>
        <td>
            <asp:DropDownList runat="server" ID="DateTypeDDL">
                <asp:ListItem Text="<%$Dict:clientAddWo.SendDate %>" Value="1"></asp:ListItem>
                <asp:ListItem Text="<%$Dict:clientAddWo.RequestedDelivaryDate %>" Value="2"></asp:ListItem>
                <asp:ListItem Text="<%$Dict:clientAddWo.PlannedDelivaryDate %>" Value="3"></asp:ListItem>                        
                <asp:ListItem Text="<%$Dict:clientAddWo.ActualDelivaryDate %>" Value="4" Selected="True"></asp:ListItem>                                         
            </asp:DropDownList>
        </td>
        <td>
            <asp:Panel ID="DemoPanel2" runat="server">
                <div class="democlass">
                    For demo - please choose "All" organizations and "Send Date" Filter
                </div>
            </asp:Panel>
        </td>
        </tr>        
        <tr>
        <td>
            <asp:Label ID="DateFromTitleLabel" runat="server" Text='<%$Dict:reportsParams.Between %>'></asp:Label>
        </td>
        <td>
            <KBMControls:KBMReadOnlyTxtBox runat="server" ID="txtFromDate"></KBMControls:KBMReadOnlyTxtBox>
            <KBMValidators:requiredValidator ID="RequiredValidator1" runat="server" ControlToValidate="txtFromDate" ErrorMessage='<%$Dict:reportsParams.MustChooseBetweenTime %>'>
            </KBMValidators:requiredValidator>
            <KBMControls:KbmCalendar TargetControlID="txtFromDate" runat="server" ID="KbmCalendar1">
            </KBMControls:KbmCalendar>
        </td>
        
        <td>
            <asp:Label ID="DateTillTitleLabel"  runat="server"  Text='<%$Dict:reportsParams.And %>'></asp:Label>
        </td>
        <td>
            <KBMControls:KBMReadOnlyTxtBox runat="server" ID="txtToDate"></KBMControls:KBMReadOnlyTxtBox>
            <%--<KBMValidators:BiggerThenEqualDateValidator ID="BiggerThenEqualDateValidator1" Display="None"
                errorMessage='<%$Dict:reportsParams.ToDateSmallerThenFromDate %>' ControlToCompare="txtFromDate"
                ControlToValidate="txtToDate" runat="server"></KBMValidators:BiggerThenEqualDateValidator>--%>
            <KBMValidators:requiredValidator ID="RequiredValidator2" ControlToValidate="txtToDate" ErrorMessage='<%$Dict:reportsParams.MustChooseToDate %>'
                runat="server"></KBMValidators:requiredValidator>
            <KBMControls:KbmCalendar TargetControlID="txtToDate" runat="server" ID="Calendar1">
            </KBMControls:KbmCalendar>
        </td>
        <td>
            <asp:Panel ID="DemoPanel3" runat="server">
                <div class="democlass">
                   For demo purposes, please choose the following dates: from 1.1.2010 till 1.1.2013
                </div>
            </asp:Panel>
        </td>
        </tr>
        <tr>
        <td>
            <asp:Label ID="SelectDateFromTitleLabel" runat="server" Text="<%$ Dict:DataFlowReport.TimeBetween %>"></asp:Label>
        </td>
        <td>
            <asp:DropDownList ID="FromDateDDL" runat="server">
                <asp:ListItem Text="<%$Dict:clientAddWo.SendDate %>" Value="1" Selected="True"></asp:ListItem>
                <asp:ListItem Text="<%$Dict:clientAddWo.RequestedDelivaryDate %>" Value="2"></asp:ListItem>
                <asp:ListItem Text="<%$Dict:clientAddWo.PlannedDelivaryDate %>" Value="3"></asp:ListItem>                        
                <asp:ListItem Text="<%$Dict:clientAddWo.ActualDelivaryDate %>" Value="4"></asp:ListItem>
            </asp:DropDownList>
        </td>
        <td>
            <asp:Label ID="SelectDateTillTitleLabel"  runat="server"  Text='<%$Dict:reportsParams.And %>'></asp:Label>
        </td>
        <td>
            <asp:DropDownList ID="TillDateDDL" runat="server">
                <asp:ListItem Text="<%$Dict:clientAddWo.SendDate %>" Value="1"></asp:ListItem>
                <asp:ListItem Text="<%$Dict:clientAddWo.RequestedDelivaryDate %>" Value="2"></asp:ListItem>
                <asp:ListItem Text="<%$Dict:clientAddWo.PlannedDelivaryDate %>" Value="3"></asp:ListItem>                        
                <asp:ListItem Text="<%$Dict:clientAddWo.ActualDelivaryDate %>" Value="4" Selected="True"></asp:ListItem>
            </asp:DropDownList>
        </td>
        <td>
            <asp:Panel ID="DemoPanel4" runat="server">
                <div class="democlass">
                    for Demo - please choose to measure time from Send Date till Actual Delivery Date
                </div>
            </asp:Panel>
        </td>
        </tr>
        <tr>
        <td>
        <asp:Button ID="GenerateReportButton" runat="server" Text="<%$ Dict:Reports.GenerateReport %>" OnClick="GenerateReport" />  
        </td>
        <td colspan="3">                
            <asp:UpdateProgress ID="Progress" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
                <ProgressTemplate>
                    <asp:Image ID="ProgressImage" runat="server" ImageUrl="~/Images/ajax-loaderBar.gif" />
                </ProgressTemplate>
            </asp:UpdateProgress>          
        </td>
        </tr>
        </table>
        <br /><hr /><br />
        <asp:Panel ID="DemoChartPanel" runat="server" Visible="false">
            <div class="democlass">
                Your graph is ready. <span style="color:Red;">Graph explanation text.</span>
            </div>
        </asp:Panel>
        <asp:Chart ID="DataFlowChart" runat="server" Width="600" Height="400" ImageLocation="~/Images/ChartsJunk" 
            ImageStorageMode="UseImageLocation" ImageType="Png" Visible="false">
            <Titles>
                <asp:Title Name="Title1" Text="<%$Dict:DataFlowReport.Title %>" Alignment="TopCenter" Font="Arial, 12px, style=Bold"></asp:Title>
            </Titles>
            <Legends>
                <asp:Legend IsTextAutoFit="true" Name="Default" Font="Arial, 12px, style=Bold" Docking="Top"></asp:Legend>                
            </Legends>
            <Series>
                <asp:Series Name="<%$Dict:DataFlowReport.DaysBetweenDates %>" ChartType="Column" IsValueShownAsLabel="true" ></asp:Series>                
            </Series>
            <ChartAreas>
                <asp:ChartArea  Name="ChartArea1" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid" BackSecondaryColor="White" 
                BackColor="Gainsboro" ShadowColor="Transparent" BackGradientStyle="TopBottom" >
                    <area3dstyle Rotation="10" perspective="10" Inclination="15" IsRightAngleAxes="False" wallwidth="0" IsClustered="False"></area3dstyle>
					<axisy linecolor="64, 64, 64, 64" IsLabelAutoFit="False" Interval="Auto">
						<labelstyle font="Arial, 8.25pt, style=Bold" />
						<majorgrid linecolor="64, 64, 64, 64" />
					</axisy>
					<axisx linecolor="64, 64, 64, 64" IsLabelAutoFit="False">
						<labelstyle font="Arial, 8.25pt, style=Bold" IsStaggered="True" />
						<majorgrid linecolor="64, 64, 64, 64" />
                        <%--<CustomLabels>
                            <asp:CustomLabel Text="<%$ Resources:Resource, OpponentAnalyze_GoalKeepersAxisXTitle %>" FromPosition="0.5" ToPosition="1.5" />
                            <asp:CustomLabel Text="<%$ Resources:Resource, OpponentAnalyze_DefenceAxisXTitle %>" FromPosition="1.5" ToPosition="2.5" />
                            <asp:CustomLabel Text="<%$ Resources:Resource, OpponentAnalyze_MidfieldAxisXTitle %>" FromPosition="2.5" ToPosition="3.5" />
                            <asp:CustomLabel Text="<%$ Resources:Resource, OpponentAnalyze_AttackAxisXTitle %>" FromPosition="3.5" ToPosition="4.5" />
                        </CustomLabels>--%>
					</axisx>                    
				</asp:ChartArea>
            </ChartAreas>
        </asp:Chart> 
    </ContentTemplate>
    </asp:UpdatePanel>    
    </asp:Panel>    
    </div>
    </form>
</body>
</html>
